import upyun

class MyUpyun:
    def __init__(self):
        self.up = upyun.UpYun('liuhan-yun','yang123','CJW8rdhU99He0qZ9HUmkGPikNhcncncf')

    #上传文件
    def upload(self,id,filename,path):
        with open(path,'rb') as f:
            self.up.put("/"+str(id)+"/"+filename,f)

myupyun = MyUpyun()
myupyun.upload(1,'d235817bcadf426c94a148fd213764a1.jpg','p6_education/static/d235817bcadf426c94a148fd213764a1.jpg')
